
/**
 * Class representing an expression in the sort list of a query.
 * @author Jonathan
 *
 */
public class SortExpression {
	/**
	 * Expression on which to sort.
	 */
	private Expression exp;
	
	/**
	 * Direction of sort: true for ascending, false for descending.
	 */
	private boolean direction;
	
	public SortExpression(Expression e, boolean d)
	{
		this.exp = e;
		this.direction = d;
	}
	
	public Expression getExpression()
	{
		return exp;
	}
	
	public boolean getDirections()
	{
		return direction;
	}
	
	public String toString()
	{
		return "[" + exp.toString() + "," + ((direction) ? "asc" : "dsc") + "]";
	}
}
